using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class ExamMap : EntityTypeConfiguration<Exam>
    {
        public ExamMap()
        {
            // Primary Key
            this.HasKey(t => t.EM_ID);

            // Properties
            this.Property(t => t.PatientID)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("Exam");
            this.Property(t => t.EM_ID).HasColumnName("EM_ID");
            this.Property(t => t.PatientID).HasColumnName("PatientID");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.Create_Time).HasColumnName("Create_Time");
            this.Property(t => t.State).HasColumnName("State");
        }
    }
}
